const user = {
    name: '<%= name %>',
    sex: "<%= sex ? '女' : '男' %>" 
}

console.log(user);